package com.imay.live.model;

import com.imay.live.constant.IMayConstant;
import com.imay.live.helper.UrlHelper;

import java.util.List;

/**
 * Created by  nick on 2017/4/17 0017.
 * 互动通知
 */

public class NoticeModel {

    private int id;

    private int eventType;

    private int giftId;

    private int giftNum;

    private String comment;

    private int mergeSize;

    private boolean isMerge;

    private long createTime;

    private List<UserModel> users;

    private List<UserModel> atUsers;

    private List<NoticeFeedModel> feeds;

    private NoticeShortLiveInfo shortLive;

    public List<NoticeFeedModel> getFeeds() {
        return feeds;
    }

    public void setFeeds(List<NoticeFeedModel> feeds) {
        this.feeds = feeds;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getEventType() {
        return eventType;
    }

    public void setEventType(int eventType) {
        this.eventType = eventType;
    }


    public int getGiftId() {
        return giftId;
    }

    public void setGiftId(int giftId) {
        this.giftId = giftId;
    }

    public int getGiftNum() {
        return giftNum;
    }

    public void setGiftNum(int giftNum) {
        this.giftNum = giftNum;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public int getMergeSize() {
        return mergeSize;
    }

    public void setMergeSize(int mergeSize) {
        this.mergeSize = mergeSize;
    }

    public boolean isMerge() {
        return isMerge;
    }

    public void setMerge(boolean merge) {
        isMerge = merge;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public List<UserModel> getUsers() {
        return users;
    }

    public void setUsers(List<UserModel> users) {
        this.users = users;
    }

    public List<UserModel> getAtUsers() {
        return atUsers;
    }

    public void setAtUsers(List<UserModel> atUsers) {
        this.atUsers = atUsers;
    }

    public NoticeShortLiveInfo getShortLive() {
        return shortLive;
    }

    public void setShortLive(NoticeShortLiveInfo shortLive) {
        this.shortLive = shortLive;
    }

    public static class NoticeFeedModel {

        private long id;
        private int feedType;
        private String imgUrl;
        private String videoUrl;

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public int getFeedType() {
            return feedType;
        }

        public void setFeedType(int feedType) {
            this.feedType = feedType;
        }

        public String getImgUrl() {
            return imgUrl;
        }

        public void setImgUrl(String imgUrl) {
            this.imgUrl = imgUrl;
        }

        public String getVideoUrl() {
            return videoUrl;
        }

        public void setVideoUrl(String videoUrl) {
            this.videoUrl = videoUrl;
        }

        public String getUrl() {
            return isImage() ? imgUrl : UrlHelper.getVideoThumbUrl(videoUrl);
        }

        public boolean isImage() {
            return 1 == feedType;
        }
    }

    public static class NoticeShortLiveInfo {
        private int shortLiveId;
        private String challengeTitle;
        private String shortLiveUrl;

        public int getShortLiveId() {
            return shortLiveId;
        }

        public void setShortLiveId(int shortLiveId) {
            this.shortLiveId = shortLiveId;
        }

        public String getChallengeTitle() {
            return challengeTitle;
        }

        public void setChallengeTitle(String challengeTitle) {
            this.challengeTitle = challengeTitle;
        }

        public String getShortLiveUrl() {
            return shortLiveUrl;
        }

        public void setShortLiveUrl(String shortLiveUrl) {
            this.shortLiveUrl = shortLiveUrl;
        }
    }
}
